############################################
############################################
## This Makefile is in chrge of building  ##
## the test for the fat_open function.    ##
############################################
############################################
#
# Directory di include
INC = -I /usr/include/CUnit/ -I ../../Src/Include/
#Compiler
CC = gcc
# Compiler flags
CFLAGS = -Wall -pedantic -g
# Where the libfat lib lives
LIB_PATH = -L ../../lib/

.PHONY: test clean

open_test: ../../bin/libfat.a open_suite.o open_test.o 
	$(CC)  $(LIB_PATH) -o open_test $^ -lcunit -lfat 

open_test.o:  open_test.c
	$(CC) $(CFLAGS) $(INC) -c $<

open_suite.o: open_suite.c
	$(CC) $(CFLAGS) $(INC) -c $<

# Target for running format test. 
test: open_test
	./open_test
	@echo -e "\n\n\a *** Test open superato! ***\n"

clean:
	rm -f *.o
	rm -f open_test
	rm -f *~